package com.bgs.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <p>
 * 日程表
 * </p>
 *
 * @author cui
 * @since 2022-05-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Schedule对象", description = "日程表")
public class ScheduleVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    private Integer sid;

    @ApiModelProperty(value = "日程id")
    private Integer scheduleid;

    @ApiModelProperty(value = "日程类型")
    private String scheduletype;

    @ApiModelProperty(value = "创建人")
    private String sname;

    @ApiModelProperty(value = "日程标题")
    private String schedulename;
    //    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @DateTimeFormat(pattern = "yyyy-MM-dd")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd")//JsonFormat是出参格式化。
    @ApiModelProperty(value = "开始时间")
    private LocalDateTime starttime;
    @DateTimeFormat(pattern = "yyyy-MM-dd ")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd")//JsonFormat是出参格式化。
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
//    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @ApiModelProperty(value = "结束时间")
    private LocalDateTime overtime;

    @ApiModelProperty(value = "附件")
    private String enclosure;

    @ApiModelProperty(value = "紧急度（1一般 2 加急 3 紧急）")
    private String urgency;

    @ApiModelProperty(value = "日程提醒（1提醒  2不 提醒）")
    private String remind;

    @ApiModelProperty(value = "日程描述")
    private String describe;

    @ApiModelProperty(value = "参与人id")
    private Integer participants;


}
